From 2acb0491fb28a62975c2a9c5a1a8c67c583a9fda Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Fri, 17 Feb 2006 15:00:47 +0000 Subject: [PATCH] Only update the virtual root if the child path is an ancestor of the 2006-02-17 Kristian Rietveld * gtk/gtktreemodelfilter.c (gtk_tree_model_filter_rows_reordered): Only update the virtual root if the child path is an ancestor of the virtual root. (Patch from Markku Vire). --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ gtk/gtktreemodelfilter.c | 3 +-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 33d2bd0b8e..9416ab87fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-02-17 Kristian Rietveld + + * gtk/gtktreemodelfilter.c (gtk_tree_model_filter_rows_reordered): + Only update the virtual root if the child path is an ancestor + of the virtual root. (Patch from Markku Vire). + 2006-02-16 Federico Mena Quintero * gtk/gtkfilechooserdialog.c (gtk_file_chooser_dialog_map): Call diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 33d2bd0b8e..9416ab87fa 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2006-02-17 Kristian Rietveld + + * gtk/gtktreemodelfilter.c (gtk_tree_model_filter_rows_reordered): + Only update the virtual root if the child path is an ancestor + of the virtual root. (Patch from Markku Vire). + 2006-02-16 Federico Mena Quintero * gtk/gtkfilechooserdialog.c (gtk_file_chooser_dialog_map): Call diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c index d34b3269b8..de08f80b31 100644 --- a/gtk/gtktreemodelfilter.c +++ b/gtk/gtktreemodelfilter.c @@ -1940,8 +1940,7 @@ gtk_tree_model_filter_rows_reordered (GtkTreeModel *c_model, /* virtual root anchor reordering */ if (filter->priv->virtual_root && - gtk_tree_path_get_depth (c_path) < - gtk_tree_path_get_depth (filter->priv->virtual_root)) + gtk_tree_path_is_ancestor (c_path, filter->priv->virtual_root)) { gint new_pos = -1; gint length; -- 2.30.2